package babo.cd.physicalexperiment.dialog;


import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.WindowManager;

import babo.cd.physicalexperiment.R;


/**
 * Created by Maxim Dybarsky | maxim.dybarskyy@gmail.com
 * on 13.01.15 at 14:22
 */
public class FishDialog extends AlertDialog {

    Context context;

    public FishDialog(Context context){
        super(context);
        this.context=context;

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.view_dialog);
        setCanceledOnTouchOutside(false);

        WindowManager.LayoutParams lp=getWindow().getAttributes();
        final float scale = context.getResources().getDisplayMetrics().density;
        lp.width=(int)(100*scale + 0.5f);
        lp.height=(int)(100*scale + 0.5f);
        getWindow().setAttributes(lp);
}
}
